# app/dependencies.py
from pathlib import Path
from data_processor.processor import DataProcessor
from core.config import BASE_DIR
from functools import lru_cache


def get_base_dir() -> Path:
    """获取项目根目录"""
    return BASE_DIR

@lru_cache()  # 缓存实例，避免重复加载
def get_processor() -> DataProcessor:
    """依赖注入：获取DataProcessor实例"""
    return DataProcessor()

# def get_mongo_client():
#     """依赖注入：获取实例"""
#     return None  # 按需实现